package com.bamboowind.rabbitmq.direct.listener;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * 消息监视者，相当于消费者
 *
 * @author cpw
 */
@Component
public class MessageListener {
    @RabbitListener(queues = "direct_queue")
    public void receive(String id) {
        System.out.println("已完成短信发送业务(direct),id:" + id);
        System.out.println();
    }
}
